<template>
  <div>APP!</div>
  <div>父级组件</div>
  <button @click="isShow = !isShow">切换显示</button>
  <hr/>
  <Child :isShow="isShow" v-if="isShow"/>
</template>

<script lang="ts">
import {defineComponent, reactive, ref} from 'vue';
import Child from "@/components/child.vue";

export default defineComponent({
  name: 'App',
  components: {
    Child
  },

  setup(){
  const isShow =ref(true)
    return{
      isShow
    }
  }
});
</script>

<style>

</style>
